package com.ljq.demo.product;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

@SpringBootApplication
/**
 * 因为实体在另外一个模块里面所以要加入@EntityScan注解
 * 否则将报错 Not a managed type: class com.ljq.entity.Product
 */
@EntityScan(basePackages = "com.ljq.entity")
//服务发现注解
@EnableDiscoveryClient
public class ShopProductApplication {

	public static void main(String[] args) {
		SpringApplication.run(ShopProductApplication.class, args);
	}

}
